/* eslint-disable */
// 该文件由 OneAPI 自动生成，请勿手动修改！

import {headerConfig, responseIntercept} from "@/services/request";
import {request} from '@umijs/max';
import {getImBaseUrl} from "@/constants";


// 获取好友列表
export async function friendGetFriendList(
    userID: string,
    pagination: {
        pageNumber: number,
        showNumber: number,
    }
) {
    return request<API.Result_>(`${getImBaseUrl()}/friend/get_friend_list`, {
        method: 'POST',
        data: {
            userID: userID,
            pagination: pagination
        },
        headers: headerConfig(),
        responseInterceptors: [responseIntercept],
    });
}

/**
 * 获取好友列表
 * @param ownerUserID 需要删除好友的用户
 * @param friendUserID 要删除的好友
 */
export async function friendDeleteFriend(
    ownerUserID: string,
    friendUserID: string
) {
    return request<API.Result_>(`${getImBaseUrl()}/friend/delete_friend`, {
        method: 'POST',
        data: {
            ownerUserID: ownerUserID,
            friendUserID: friendUserID
        },
        headers: headerConfig(),
        responseInterceptors: [responseIntercept],
    });
}

